package rs.etf.kdp.client;

import java.awt.BorderLayout;
import java.awt.FlowLayout;

import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JLabel;
import java.awt.Font;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;

public class AboutMe extends JDialog {

	/**
	 * 
	 */
	private static final long serialVersionUID = -7477953821183648L;
	private final JPanel contentPanel = new JPanel();

	/**
	 * Launch the application.
	 */
//	public static void main(String[] args) {
//		try {
//			AboutMe dialog = new AboutMe();
//			dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
//			dialog.setVisible(true);
//		} catch (Exception e) {
//			e.printStackTrace();
//		}
//	}

	/**
	 * Create the dialog.
	 */
	public AboutMe(JFrame parent) {
		super(parent, "About", true);
		setBounds(100, 100, 417, 200);
		getContentPane().setLayout(new BorderLayout());
		contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
		getContentPane().add(contentPanel, BorderLayout.CENTER);
		contentPanel.setLayout(null);
		
		JLabel lblCreatedByDjordje = new JLabel("Created by: Djordje Vukovic");
		lblCreatedByDjordje.setFont(new Font("Tahoma", Font.PLAIN, 14));
		lblCreatedByDjordje.setBounds(10, 11, 218, 29);
		contentPanel.add(lblCreatedByDjordje);
		
		JLabel lblConcurrentAndDistributed = new JLabel("Project for concurrent and distribouted programming course");
		lblConcurrentAndDistributed.setBounds(10, 47, 381, 14);
		contentPanel.add(lblConcurrentAndDistributed);
		
		JLabel label = new JLabel("05.16.2011");
		label.setBounds(10, 72, 67, 14);
		contentPanel.add(label);
		{
			JPanel buttonPane = new JPanel();
			buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT));
			getContentPane().add(buttonPane, BorderLayout.SOUTH);
			{
				JButton okButton = new JButton("OK");
				okButton.addActionListener(new ActionListener() {
					public void actionPerformed(ActionEvent arg0) {
						setVisible(false);
					}
				});
				okButton.setActionCommand("OK");
				buttonPane.add(okButton);
				getRootPane().setDefaultButton(okButton);
			}
		}
	}
}
